package com.smartstate.IOC.controller;


import com.smartstate.IOC.dto.EnergyDTO;
import com.smartstate.IOC.service.impl.PowerMeterSummaryServiceImpl;
import com.smartstate.IOC.vo.ResultVO;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

import java.util.List;
import java.util.Map;

/**
 * <p>能源能耗</p>
 * <p>@Author 陈永杰</p>
 * <p>@Date: 2022/9/2</p>
 * <p>@Time: 13:33</p>
 * <p>@version 1.0 <p>
 */

@RestController
@Api(tags = {"能源能耗"})
@RequestMapping("/powerMeterSummary")
public class PowerMeterSummaryController {

    @Autowired
    private PowerMeterSummaryServiceImpl summaryService;

    /**
     * 碳足迹
     * @return
     */
    @GetMapping("/selectCarbonFootprint")
    @ApiOperation(value = "碳足迹")
    public ResultVO<List<Map<String, Object>>> selectCarbonFootprint() {
        EnergyDTO energyDTO = new EnergyDTO();
        energyDTO.setGraininess("2");
        energyDTO.setModelName("3");
        energyDTO.setParentId("0");
        energyDTO.setRateType("电");
        return ResultVO.ok(summaryService.selectCarbonFootprint(energyDTO));
    }

}